package com.bkgy.modular.earlyWarningAnalysis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bkgy.modular.earlyWarningAnalysis.entity.CountNumEntity;
import com.bkgy.modular.earlyWarningAnalysis.entity.StatisticalAnalysis;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StatisticalAnalysisMapper extends BaseMapper<StatisticalAnalysis> {
    /**
     * 条件查询接口
     */
    List<StatisticalAnalysis> findByData(
            @Param("pageIndex") Integer pageIndex,
            @Param("pageSize") Integer pageSize,
            @Param("condition") Object condition
    );

    /**
     * 条件查询接口统计个数
     * @param condition
     * @return
     */
    Integer findByDataCount(@Param("condition") Object condition);

    /**
     * 预警数量
     */
    List<CountNumEntity> findByCount(@Param("condition") Object condition);

    /**
     * 条件预警趋势变化
     */
    List<CountNumEntity> findTimeCount(
            @Param("startTime") String startTime,
            @Param("endTime") String endTime
//            @Param("startTime") Timestamp startTime,
//            @Param("endTime") Timestamp endTime
    );
}
